package com.woniu.controller;


import com.woniu.model.DepotDetial;
import com.woniu.model.Result;
import com.woniu.service.DepotService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  仓库相关接口
 * </p>
 *
 * @author eason
 * @since 2024年05月23日
 */
@RestController
@Api(tags = "仓库相关接口")
@RequestMapping("/depot")
public class DepotController {
    @Resource
    private DepotService depotService;

    /**
     * 给某个站点新增仓库
     * @param id 站点id
     */
    @GetMapping("/add/{id}")
    @ApiOperation("给某个站点新增仓库")
    public Result<?> add(@PathVariable("id") Integer id) throws Exception {
        depotService.add(id);
        return Result.newInstance(null).setCode(200).setMessage("根据站点id新增仓库成功!");
    }
}

